from numpy import array
from v3dsolver.vector import Vec

def get_pseudo_pos_list(cell,n):
    """ 
    Returns list of positions for pseudo particles using a spherical t-design.
    
    cell: cell for which pseudo particles are to be obtained
    n: number of pseudo particles
    """
    pos_list=[]
    if n==4:
        pos_list += [Vec(.577350269189625763,.577350269189625763,.577350269189625763)]
        pos_list +=[Vec(.577350269189625763,-0.577350269189625763,-0.577350269189625763)]
        pos_list += [Vec(-0.577350269189625763,.577350269189625763,-0.577350269189625763)]
        pos_list += [Vec(-0.577350269189625763,-0.577350269189625763,.577350269189625763)]
    if n==6:
        pos_list += [Vec(1.0,0.0,0.0)]
        pos_list += [Vec(-1.0,0.0,0.0)]
        pos_list += [Vec(0.0,1.0,0.0)]
        pos_list += [Vec(0.0,-1.0,0.0)]
        pos_list += [Vec(0.0,0.0,1.0)]
        pos_list += [Vec(0.0,0.0,-1.0)]
    if n==8:
        pos_list += [Vec(.57735026918962576449,.57735026918962576449,.57735026918962576449)]
        pos_list += [Vec(.57735026918962576449,.57735026918962576449,-0.57735026918962576449)]
        pos_list += [Vec(.57735026918962576449,-0.57735026918962576449,.57735026918962576449)]
        pos_list += [Vec(-.57735026918962576449,.57735026918962576449,.57735026918962576449)]
        pos_list += [Vec(.57735026918962576449,-0.57735026918962576449,-0.57735026918962576449)]
        pos_list += [Vec(-0.57735026918962576449,.57735026918962576449,-0.57735026918962576449)]
        pos_list += [Vec(-0.57735026918962576449,-0.57735026918962576449,.57735026918962576449)]
        pos_list += [Vec(-0.57735026918962576449,-0.57735026918962576449,-0.57735026918962576449)]
    if n==10:
        pos_list += [Vec(.57735026918962576449,.81649658092772603273,0.0)]
        pos_list += [Vec(.57735026918962576449,.25231131935570691969,.77653439382402705097)]
        pos_list += [Vec(.57735026918962576449,-0.66055960981956993606,.47992464881654514993)]
        pos_list += [Vec(.57735026918962576449,-0.66055960981956993606,-0.47992464881654514993)]
        pos_list += [Vec(.57735026918962576449,.25231131935570691969,-0.77653439382402705097)]
        pos_list += [Vec(-0.57735026918962576449,.81649658092772603273,0.0)]
        pos_list += [Vec(-0.57735026918962576449,.25231131935570691969,.77653439382402705097)]
        pos_list += [Vec(-0.57735026918962576449,-0.66055960981956993606,.47992464881654514993)]
        pos_list += [Vec(-0.57735026918962576449,-0.66055960981956993606,-0.47992464881654514993)]
        pos_list += [Vec(-0.57735026918962576449,.25231131935570691969,-0.77653439382402705097)]
    if n==12:
        pos_list += [Vec(0.850650808352,0.0,-0.525731112119)]
        pos_list += [Vec(0.525731112119,-0.850650808352,0.0)]
        pos_list += [Vec(0.0,-0.525731112119,0.850650808352)]
        pos_list += [Vec(0.850650808352,0.0,0.525731112119)]
        pos_list += [Vec(-0.525731112119,-0.850650808352,0.0)]
        pos_list += [Vec(0.0,0.525731112119,-0.850650808352)]
        pos_list += [Vec(-0.850650808352,0.0,-0.525731112119)]
        pos_list += [Vec(-0.525731112119,0.850650808352,0.0)]
        pos_list += [Vec(0.0,0.525731112119,0.850650808352)]
        pos_list += [Vec(-0.850650808352,0.0,0.525731112119)]
        pos_list += [Vec(0.525731112119,0.850650808352,0.0)]
        pos_list += [Vec(0.0,-0.525731112119,-0.850650808352)]
    if n==16:
        pos_list += [Vec(0.5773502691896258,0.5773502691896258,0.5773502691896258)]
        pos_list += [Vec(0.5773502691896258,-0.5773502691896258,-0.5773502691896258)]
        pos_list += [Vec(-0.5773502691896258,0.5773502691896258,-0.5773502691896258)]
        pos_list += [Vec(-0.5773502691896258,-0.5773502691896258,0.5773502691896258)]
        pos_list += [Vec(-0.9030073291598593,-0.1826964031330545,-0.3888441690006706)]
        pos_list += [Vec(-0.9030073291598593,0.1826964031330545,0.3888441690006706)]
        pos_list += [Vec(0.9030073291598593,-0.1826964031330545,0.3888441690006706)]
        pos_list += [Vec(0.9030073291598593,0.1826964031330545,-0.3888441690006706)]
        pos_list += [Vec(-0.3888441690006706,-0.9030073291598593,-0.1826964031330545)]
        pos_list += [Vec(0.3888441690006706,-0.9030073291598593,0.1826964031330545)]
        pos_list += [Vec(0.3888441690006706,0.9030073291598593,-0.1826964031330545)]
        pos_list += [Vec(-0.3888441690006706,0.9030073291598593,0.1826964031330545)]
        pos_list += [Vec(-0.1826964031330545,-0.3888441690006706,-0.9030073291598593)]
        pos_list += [Vec(0.1826964031330545,0.3888441690006706,-0.9030073291598593)]
        pos_list += [Vec(0.1826964031330545,-0.3888441690006706,0.9030073291598593)]
        pos_list += [Vec(-0.1826964031330545,0.3888441690006706,0.9030073291598593)]
    if n==18:
        pos_list += [Vec(.78097731415220200,-.51726192535235900,.35002076418461700)]
        pos_list += [Vec(.05748209179071500,-.93497698549435600,.35001977904005600)]
        pos_list += [Vec(-.83845075096339900,.41771312082849700,.35002298052646400)]
        pos_list += [Vec(-.83845075096339900,-.41771312082849700,.35002298052646400)]
        pos_list += [Vec(.05748209179071600,.93497698549435600,.35001977904005700)]
        pos_list += [Vec(.78097731415220200,.51726192535235900,.35002076418461700)]
        pos_list += [Vec(-.78097731415220200,-.51726192535235900,-.35002076418461700)]
        pos_list += [Vec(-.05748209179071600,-.93497698549435700,-.35001977904005600)]
        pos_list += [Vec(.83845075096339900,.41771312082849700,-.35002298052646400)]
        pos_list += [Vec(.83845075096339900,-.41771312082849700,-.35002298052646400)]
        pos_list += [Vec(-.78097731415220200,.51726192535235900,-.35002076418461700)]
        pos_list += [Vec(-.05748209179071500,.93497698549435600,-.35001977904005600)]
        pos_list += [Vec(-.24750268545542100,.42868856511968500,.86888925348860200)]
        pos_list += [Vec(.49500101576510600,0.00000000000000000,.86889239517417400)]
        pos_list += [Vec(-.24750268545542100,-.42868856511968500,.86888925348860200)]
        pos_list += [Vec(.24750268545542100,.42868856511968500,-.86888925348860200)]
        pos_list += [Vec(-.49500101576510600,.00000000000000000,-.86889239517417400)]
        pos_list += [Vec(.24750268545542100,-.42868856511968500,-.86888925348860200)]
    if n==20:
        pos_list += [Vec(0.57735026919,0.57735026919,0.57735026919)]
        pos_list += [Vec(0.57735026919,0.57735026919,-0.57735026919)]
        pos_list += [Vec(0.57735026919,-0.57735026919,0.57735026919)]
        pos_list += [Vec(-0.57735026919,0.57735026919,0.57735026919)]
        pos_list += [Vec(0.57735026919,-0.57735026919,-0.57735026919)]
        pos_list += [Vec(-0.57735026919,0.57735026919,-0.57735026919)]
        pos_list += [Vec(-0.57735026919,-0.57735026919,0.57735026919)]
        pos_list += [Vec(-0.57735026919,-0.57735026919,-0.57735026919)]
        pos_list += [Vec(0.0,0.356822089773,0.934172358963)]
        pos_list += [Vec(0.0,-0.356822089773,0.934172358963)]
        pos_list += [Vec(0.0,0.356822089773,-0.934172358963)]
        pos_list += [Vec(0.0,-0.356822089773,-0.934172358963)]
        pos_list += [Vec(0.934172358963,0.0,0.356822089773)]
        pos_list += [Vec(0.934172358963,0.0,-0.356822089773)]
        pos_list += [Vec(-0.934172358963,0.0,0.356822089773)]
        pos_list += [Vec(-0.934172358963,0.0,-0.356822089773)]
        pos_list += [Vec(0.356822089773,0.934172358963,0.0)]
        pos_list += [Vec(-0.356822089773,0.934172358963,0.0)]
        pos_list += [Vec(0.356822089773,-0.934172358963,0.0)]
        pos_list += [Vec(-0.356822089773,-0.934172358963,0.0)]
    if n==24:
        pos_list += [Vec(0.850340207407,0.462320627818,0.251358645685)]
        pos_list += [Vec(0.850340207407,-0.462320627818,-0.251358645685)]
        pos_list += [Vec(0.850340207407,0.251358645685,-0.462320627818)]
        pos_list += [Vec(0.850340207407,-0.251358645685,0.462320627818)]
        pos_list += [Vec(-0.850340207407,0.462320627818,-0.251358645685)]
        pos_list += [Vec(-0.850340207407,-0.462320627818,0.251358645685)]
        pos_list += [Vec(-0.850340207407,0.251358645685,0.462320627818)]
        pos_list += [Vec(-0.850340207407,-0.251358645685,-0.462320627818)]
        pos_list += [Vec(0.251358645685,0.850340207407,0.462320627818)]
        pos_list += [Vec(-0.251358645685,0.850340207407,-0.462320627818)]
        pos_list += [Vec(-0.462320627818,0.850340207407,0.251358645685)]
        pos_list += [Vec(0.462320627818,0.850340207407,-0.251358645685)]
        pos_list += [Vec(-0.251358645685,-0.850340207407,0.462320627818)]
        pos_list += [Vec(0.251358645685,-0.850340207407,-0.462320627818)]
        pos_list += [Vec(0.462320627818,-0.850340207407,0.251358645685)]
        pos_list += [Vec(-0.462320627818,-0.850340207407,-0.251358645685)]
        pos_list += [Vec(0.462320627818,0.251358645685,0.850340207407)]
        pos_list += [Vec(-0.462320627818,-0.251358645685,0.850340207407)]
        pos_list += [Vec(0.251358645685,-0.462320627818,0.850340207407)]
        pos_list += [Vec(-0.251358645685,0.462320627818,0.850340207407)]
        pos_list += [Vec(0.462320627818,-0.251358645685,-0.850340207407)]
        pos_list += [Vec(-0.462320627818,0.251358645685,-0.850340207407)]
        pos_list += [Vec(0.251358645685,0.462320627818,-0.850340207407)]
        pos_list += [Vec(-0.251358645685,-0.462320627818,-0.850340207407)]
    if n==48:
        pos_list += [Vec(0.933364693199,0.353542188921,-0.0619537742319)]
        pos_list += [Vec(0.933364693199,-0.353542188921,0.0619537742319)]
        pos_list += [Vec(0.933364693199,-0.0619537742319,-0.353542188921)]
        pos_list += [Vec(0.933364693199,0.0619537742319,0.353542188921)]
        pos_list += [Vec(-0.933364693199,0.353542188921,0.0619537742319)]
        pos_list += [Vec(-0.933364693199,-0.353542188921,-0.0619537742319)]
        pos_list += [Vec(-0.933364693199,-0.0619537742319,0.353542188921)]
        pos_list += [Vec(-0.933364693199,0.0619537742319,-0.353542188921)]
        pos_list += [Vec(-0.0619537742319,0.933364693199,0.353542188921)]
        pos_list += [Vec(0.0619537742319,0.933364693199,-0.353542188921)]
        pos_list += [Vec(-0.353542188921,0.933364693199,-0.0619537742319)]
        pos_list += [Vec(0.353542188921,0.933364693199,0.0619537742319)]
        pos_list += [Vec(0.0619537742319,-0.933364693199,0.353542188921)]
        pos_list += [Vec(-0.0619537742319,-0.933364693199,-0.353542188921)]
        pos_list += [Vec(0.353542188921,-0.933364693199,-0.0619537742319)]
        pos_list += [Vec(-0.353542188921,-0.933364693199,0.0619537742319)]
        pos_list += [Vec(0.353542188921,-0.0619537742319,0.933364693199)]
        pos_list += [Vec(-0.353542188921,0.0619537742319,0.933364693199)]
        pos_list += [Vec(-0.0619537742319,-0.353542188921,0.933364693199)]
        pos_list += [Vec(0.0619537742319,0.353542188921,0.933364693199)]
        pos_list += [Vec(0.353542188921,0.0619537742319,-0.933364693199)]
        pos_list += [Vec(-0.353542188921,-0.0619537742319,-0.933364693199)]
        pos_list += [Vec(-0.0619537742319,0.353542188921,-0.933364693199)]
        pos_list += [Vec(0.0619537742319,-0.353542188921,-0.933364693199)]
        pos_list += [Vec(0.706841697713,0.63974009862,0.301840057966)]
        pos_list += [Vec(0.706841697713,-0.63974009862,-0.301840057966)]
        pos_list += [Vec(0.706841697713,0.301840057966,-0.63974009862)]
        pos_list += [Vec(0.706841697713,-0.301840057966,0.63974009862)]
        pos_list += [Vec(-0.706841697713,0.63974009862,-0.301840057966)]
        pos_list += [Vec(-0.706841697713,-0.63974009862,0.301840057966)]
        pos_list += [Vec(-0.706841697713,0.301840057966,0.63974009862)]
        pos_list += [Vec(-0.706841697713,-0.301840057966,-0.63974009862)]
        pos_list += [Vec(0.301840057966,0.706841697713,0.63974009862)]
        pos_list += [Vec(-0.301840057966,0.706841697713,-0.63974009862)]
        pos_list += [Vec(-0.63974009862,0.706841697713,0.301840057966)]
        pos_list += [Vec(0.63974009862,0.706841697713,-0.301840057966)]
        pos_list += [Vec(-0.301840057966,-0.706841697713,0.63974009862)]
        pos_list += [Vec(0.301840057966,-0.706841697713,-0.63974009862)]
        pos_list += [Vec(0.63974009862,-0.706841697713,0.301840057966)]
        pos_list += [Vec(-0.63974009862,-0.706841697713,-0.301840057966)]
        pos_list += [Vec(0.63974009862,0.301840057966,0.706841697713)]
        pos_list += [Vec(-0.63974009862,-0.301840057966,0.706841697713)]
        pos_list += [Vec(0.301840057966,-0.63974009862,0.706841697713)]
        pos_list += [Vec(-0.301840057966,0.63974009862,0.706841697713)]
        pos_list += [Vec(0.63974009862,-0.301840057966,-0.706841697713)]
        pos_list += [Vec(-0.63974009862,0.301840057966,-0.706841697713)]
        pos_list += [Vec(0.301840057966,0.63974009862,-0.706841697713)]
        pos_list += [Vec(-0.301840057966,-0.63974009862,-0.706841697713)]
    
    for i in range(len(pos_list)):
            position = pos_list[i]
            pos_list[i] = cell.center + pos_list[i]*cell.radius
    return pos_list
